project(HELLO)
cmake_minimum_required(VERSION 2.6)

set(CMAKE_CXX_FLAGS "-fopenmp")
set(CMAKE_C_FLAGS "-fopenmp")
set(CMAKE_EXE_LINKER_FLAGS "-lgomp")
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREAD ON)
set(Boost_DEBUG TRUE)
find_package(Boost 1.40.0 REQUIRED COMPONENTS thread)
find_package(OpenMP REQUIRED)

set(HELLO_SRCS main.cpp)
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
add_executable(hello ${HELLO_SRCS})
target_link_libraries(hello ${Boost_LIBRARIES}) 

